﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Taype.Trading.BTC.MtGoxAPIClient.JSONObjects
{

    // TODO: Add unit tests and create structure
    // \":{\"BTC\":{\"Balance\":{\"value\":\"0.86053625\",\"value_int\":\"86053625\",\"display\":\"0.86053625\\u00a0BTC\",\"currency\":\"BTC\"},\"Operations\":1,\"Daily_Withdraw_Limit\":{\"value\":\"400.00000000\",\"value_int\":\"40000000000\",\"display\":\"400.00000000\\u00a0BTC\",\"currency\":\"BTC\"},\"Monthly_Withdraw_Limit\":null,\"Max_Withdraw\":{\"value\":\"400.00000000\",\"value_int\":\"40000000000\",\"display\":\"400.00000000\\u00a0BTC\",\"currency\":\"BTC\"}},\"USD\":{\"Balance\":{\"value\":\"0.00000\",\"value_int\":\"0\",\"display\":\"$0.00000\",\"currency\":\"USD\"},\"Operations\":0,\"Daily_Withdraw_Limit\":{\"value\":\"1000.00000\",\"value_int\":\"100000000\",\"display\":\"$1,000.00000\",\"currency\":\"USD\"},\"Monthly_Withdraw_Limit\":{\"value\":\"10000.00000\",\"value_int\":\"1000000000\",\"display\":\"$10,000.00000\",\"currency\":\"USD\"},\"Max_Withdraw\":{\"value\":\"1000.00000\",\"value_int\":\"100000000\",\"display\":\"$1,000.00000\",\"currency\":\"USD\"}}}

    // \":{\"BTC\":{\"Balance\":{\"value\":\"0.86053625\",\"value_int\":\"86053625\",\"display\":\"0.86053625\\u00a0BTC\",\"currency\":\"BTC\"},\"Operations\":1,\"Daily_Withdraw_Limit\":{\"value\":\"400.00000000\",\"value_int\":\"40000000000\",\"display\":\"400.00000000\\u00a0BTC\",\"currency\":\"BTC\"},\"Monthly_Withdraw_Limit\":null,\"Max_Withdraw\":{\"value\":\"400.00000000\",\"value_int\":\"40000000000\",\"display\":\"400.00000000\\u00a0BTC\",\"currency\":\"BTC\"}},
    // \"USD\":{\"Balance\":{\"value\":\"0.00000\",\"value_int\":\"0\",\"display\":\"$0.00000\",\"currency\":\"USD\"},\"Operations\":0,\"Daily_Withdraw_Limit\":{\"value\":\"1000.00000\",\"value_int\":\"100000000\",\"display\":\"$1,000.00000\",\"currency\":\"USD\"},\"Monthly_Withdraw_Limit\":{\"value\":\"10000.00000\",\"value_int\":\"1000000000\",\"display\":\"$10,000.00000\",\"currency\":\"USD\"},\"Max_Withdraw\":{\"value\":\"1000.00000\",\"value_int\":\"100000000\",\"display\":\"$1,000.00000\",\"currency\":\"USD\"}}}

    /// <summary>
    /// Encapsulates information about user-held wallets returned by the info() method
    /// </summary>
    public class MtGoxWallet
    {
        public MtGoxCurrencySymbol name { get; set; }

        public MtGoxWalletBalance balance { get; set; }
        
        public int Operations { get; set; }
        
        public MtGoxWithdrawalLimit Daily_Withdraw_Limit { get; set; }
        
        public MtGoxWithdrawalLimit Monthly_Withdraw_Limit { get; set; }
        
        public MtGoxWithdrawalLimit Max_Withdraw { get; set; }

        public MtGoxWallet(MtGoxCurrencySymbol name, MtGoxWalletBalance balance, int Operations, MtGoxWithdrawalLimit Daily_Withdraw_Limit, MtGoxWithdrawalLimit Monthly_Withdraw_Limit, MtGoxWithdrawalLimit Max_Withdraw)
        {
            this.name = name;
            this.balance = balance;
            this.Operations = Operations;
            this.Daily_Withdraw_Limit = Daily_Withdraw_Limit;
            this.Monthly_Withdraw_Limit = Monthly_Withdraw_Limit;
            this.Max_Withdraw = Max_Withdraw;
        }

        public MtGoxWallet()
        { }

        public static MtGoxWallet getObjects(string jsonData)
        {
            throw new NotImplementedException();
            return null;
        }

    }
}
